package com.chen.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
@ApiModel(description = "订单")
@Data
@TableName("t_order")
public class Order {
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("商品单价")
    private BigDecimal payPrice;

    @ApiModelProperty("商品id")
    private Long productId;

    @ApiModelProperty("邮费")
    private BigDecimal postFee;

    @ApiModelProperty("购买商品的数量")
    private Integer count;

    @ApiModelProperty("订单状态")
    private Integer state;  // 1-已支付，2-未支付，3-已取消，4-已发货，5-已完成，6-退款中

    @ApiModelProperty("订单创建时间")
    private Date createTime;

    @ApiModelProperty("付款时间")
    private Date paymentTime;

    @ApiModelProperty("交易完成时间")
    private Date endTime;

    @ApiModelProperty("用户id")
    private Integer userId;

    @ApiModelProperty("用户名")
    private String username;

    @ApiModelProperty("订单号")
    private String orderNo;

    @ApiModelProperty("商品名称")
    private String orderName;

    @ApiModelProperty("商品图片")
    private String orderPicture;
}
